import request from '@/utils/request'
import {projectApiUrl} from '../config'
/**
 * 获取项目领导班子岗位人员
 * @param parameter
 */
export function getAdjustList(parameter){
  return request({
    url: projectApiUrl+'/projects/leaders',
    method: 'get',
    params: parameter
  })
}
/**
 * 获取历史调整记录
 * @param parameter
 */
export function getProjectJobAdjustsHistory(parameter){
  return request({
    url: projectApiUrl+'/projects/jobs/project-job-adjusts-history',
    method: 'post',
    data: parameter
  })
}

/**
 *  岗位调整详情
 * @param parameter
 */
export function getAdjustListDels(parameter){
  return request({
    url: projectApiUrl+'/projects/job-adjust-detail',
    method: 'get',
    params: parameter
  })
}


/**
 * 项目人员调整提交审批
 * @param customerId
 */
export function getAdjustsApprove(data){
  return request({
    url: projectApiUrl+'/projects/employees-adjust',
    method: 'post',
    data:data
  })
}

/**
 * 获取项目其他岗位人员
 * @param data
 */
export function getEmployees(data){
  return request({
    url: projectApiUrl+'/projects/employees',
    method: 'get',
    data: data
  })
}
/**
 * 获取项目岗位人员调整记录
 * @param data
 */
export function getJobAdjust(data){
  return request({
    url: projectApiUrl+'/projects/job-adjust',
    method: 'get',
    params: data
  })
}

/**
 * 删除项目其他人员
 * @param data
 */
export function deleteAdjusts(data){
  return request({
    url: projectApiUrl+'/projects/employees',
    method: 'post',
    data: data
  })
}

/**
 * 获取人员调整详情
 */
export function getDetailInAudit(params){
  return request({
    url: projectApiUrl + '/projects/job-adjust-detail/approve',
    method: 'get',
    params
  })
}